import Bullet from "../../bullet";
import { EditorAttr } from "../../bullet_editor_attribute";
import LightMap from "../../light_map";
import World from "../../world";

const { ccclass, property } = cc._decorator;

@ccclass
export default class LightBulb extends Bullet {
    @property(LightMap)
    lightMap: LightMap = null;

    @EditorAttr("动态光")
    @property
    dynamicLight = false;

    onEnterWorld(): void {
        this.lightMap.setWorld(this.world);
        this.lightMap.dynamic = this.dynamicLight;
    }
};